import time

from mpi4py import MPI

comm = MPI.COMM_WORLD
while True:
    print("Hello from rank %d out of %d !" % (comm.rank, comm.size))
    time.sleep(1)
comm.Barrier()  # wait to sync here (not needed for this example)
